#include <func.h>

int main(int argc, char* argv[])
{
    int fd = open("a.txt", O_RDWR | O_CREAT | O_APPEND, 0666);
    if (fd == -1) {
        perror("open()");
        exit(1);
    }

    long pos = lseek(fd, 0, SEEK_CUR);
    printf("pos: %ld\n", pos);
    write(fd, "I love xixi", 11);
    printf("pos: %ld\n", lseek(fd, 0, SEEK_CUR));

    close(fd);
    return 0;
}

